import mongoose from 'mongoose'
// 生成Schema模型
const Schema = mongoose.Schema
const damageUpSchema = new Schema({
  studentNumber: {
    type: String,
    require: true
  },
  name: {
    type: String,
    require: true
  },
  class: {
    type: String
  },
  tower: {
    type: String
  },
  dorm: {
    type: String
  },
  article: {
    type: String
  },
  desc: {
    type: String
  },
  tel: {
    type: String,
  },
  isSolve: {
    type: Boolean,
    default: false
  },
  time: {
    type: Date,
    default: Date.now
  },
  finishTime: {
    type: Date,
    default: null
  },
  costId: {
    type: String
  }
})

export default mongoose.model('damageUp', damageUpSchema, 'damageUp')
